﻿<%@ Page Title="Stock Paid Up Capital" Language="C#" MasterPageFile="~/Backoffice/BackOffice.Master"
    AutoEventWireup="true" CodeBehind="StocksPaidUpCapital.aspx.cs" Inherits="TreaShares.Backoffice.User.StocksPaidUpCapital" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <%=Request.QueryString["StockName"]%><hr />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="Id" DataSourceID="ObjectDataSource1">
        <Columns>
            <asp:BoundField DataField="EffectiveDate" HeaderText="Effective Date" DataFormatString="{0:d}" />
            <asp:BoundField DataField="PaidUpCapital" HeaderText="Paid Up Capital" DataFormatString="{0:###,###.##}" />
            <asp:TemplateField HeaderText="Delete" HeaderStyle-HorizontalAlign="Center">
                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" />
                <ItemTemplate>
                    <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/Icons/trash.gif"
                        CommandName="Delete" OnClientClick="return confirm('Are you sure you want to delete?')" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <EmptyDataTemplate>
            No paid up capital entries were found!!
        </EmptyDataTemplate>
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="SelectStocksPaidUpCapital"
        TypeName="TreaShares.Backoffice.Controlers.StocksManager" DeleteMethod="DeletePaidUpCapital">
        <SelectParameters>
            <asp:CookieParameter Name="clientId" CookieName="organisationId" Type="String" />
            <asp:QueryStringParameter Name="stockId" QueryStringField="StockId" DbType="Int32" />
        </SelectParameters>
        <DeleteParameters>
            <asp:Parameter Name="id" Type="Int32" />
        </DeleteParameters>
    </asp:ObjectDataSource>
    <br />
    <table border="0" cellpadding="2" cellspacing="2">
        <tr>
            <td colspan="2">
            Insert Paid Up Capital
            </td>
        </tr>
        <tr>
            <td>
                Paid up capital
            </td>
            <td>
                <asp:TextBox ID="txtPaidUpCapital" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                Effective date
            </td>
            <td>
                <asp:TextBox ID="txtEffectiveDate" runat="server" CssClass="datepicker"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="right">
                <asp:Button ID="btnInsert" runat="server" Text="Insert" CssClass="button" 
                    onclick="btnInsert_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
